package comm

import (
	cache2 "wx-api/ssp-api/cache"
	"wx-api/ssp-api/errmsg"
	"wx-api/ssp-api/handlers"
)

func GetUserInfo(c *handlers.Controller) string {
	tmpid, _ := c.Ctx.Get("sspuser")
	//获取用户登陆信息
	_, ok := cache2.CacheSspUserMapNGet(tmpid.(string))
	if !ok {
		c.SetErrorMsg(nil, errmsg.GetError("user is error"))
		return ""
	}
	return tmpid.(string)
}
